﻿using UnityEngine;
using System.Collections;

public class AbilityScript : MonoBehaviour {

	public int firstAbility, secondAbility;
	BaseAbility[] abilities;

	void Start(){
		abilities = new BaseAbility[4];
		abilities [0] = new BlinkScript ();
		abilities [1] = new DashScript ();
		abilities [2] = new ShieldScript ();
		abilities [3] = new VisionScript ();
	}

	// Update is called once per frame
	void Update () {
		if (Input.GetButtonDown ("Ability1")){
			useFirstAbility();
		}else if (Input.GetButtonDown ("Ability2")){
			useSecondAbility ();
		}
	}

	void useFirstAbility(){
		abilities [firstAbility].excecute (gameObject);
	}

	void useSecondAbility(){
		abilities [secondAbility].excecute (gameObject);
	}
}
